473,418 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Calling html link from a button?

I have a need to call an html page into the pane I'm viewing using a button
on an ASP page. The page itself is an ASP page called from a website. I know
a link would work but the rest of the page has buttons and it would look
cleaner to use a button.

I've tried the below in a few variations, including using a href tags inside
the onclick. Anyone have a suggestion on what I'm doing wrong here?

<input type="button" value="<%=L_MBS_Text%>"
onclick="get(https://domain.com/size/")>

--
Sean M. Loftus
Enterprise Architect
Loftus Consulting, Inc.
www.LoftusConsulting.com
sean(removeme)@loftus.org
Nov 22 '05 #1
5 15772
"Sean M. Loftus" <sean(remove me)@loftus.org> wrote in message
news:eI**************@TK2MSFTNGP11.phx.gbl...
I have a need to call an html page into the pane I'm viewing using a button on an ASP page. The page itself is an ASP page called from a website. I know a link would work but the rest of the page has buttons and it would look
cleaner to use a button.

I've tried the below in a few variations, including using a href tags inside the onclick. Anyone have a suggestion on what I'm doing wrong here?

<input type="button" value="<%=L_MBS_Text%>"
onclick="get(https://domain.com/size/")>

--
Sean M. Loftus
Enterprise Architect
Loftus Consulting, Inc.
www.LoftusConsulting.com
sean(removeme)@loftus.org


You did not show us your get() function.

Perhaps all you want is this:

<input type="button" value="<%=L_MBS_Text%>"
onclick="location.href='https://domain.com/size/'">
Nov 22 '05 #2
Sean M. Loftus wrote on 17 nov 2005 in
microsoft.public.inetserver.asp.general:
I have a need to call an html page into the pane I'm viewing using a
button on an ASP page. The page itself is an ASP page called from a
website. I know a link would work but the rest of the page has buttons
and it would look cleaner to use a button.

I've tried the below in a few variations, including using a href tags
inside the onclick. Anyone have a suggestion on what I'm doing wrong
here?

<input type="button" value="<%=L_MBS_Text %>"
onclick="get(https://domain.com/size/")>


This is a clientside JS problem, so OT on this NG
please follow up elswhere

<input type="button" value="<%=L_MBS_Text %>"
onclick="location.href='https://domain.com/size/'">

or

<button
onclick="location.href='https://domain.com/size/'">
<%=L_MBS_Text%>
</button>

perhaps you want:

<button
onclick="location.href='<%=L_MBS_Link %>'">
<%=L_MBS_Text %>
</button>
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Nov 22 '05 #3
Sean M. Loftus wrote:
I have a need to call an html page into the pane I'm viewing using a
button on an ASP page.
This is not an ASP problem (you could be trying to do the same with a button
on an htm page, couldn't you? This makes it a client-side scriting problem,
not ASP). ASP knows nothing about buttons or any other UI elements.

But, read on.
The page itself is an ASP page called from a
website. I know a link would work but the rest of the page has
buttons and it would look cleaner to use a button.

I've tried the below in a few variations, including using a href tags
inside the onclick. Anyone have a suggestion on what I'm doing wrong
here?

<input type="button" value="<%=L_MBS_Text%>"
onclick="get(https://domain.com/size/")>


Is get() a function that you wrote? I think you want to set the current
window's location to that url, correct? Like this:

onclick="window.location = 'https://domain.com/size/';">

Please follow up in a client-side scripting group such as
..scripting.jscript.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Nov 22 '05 #4
Bob Barrows [MVP] wrote:
onclick="window.location = 'https://domain.com/size/';">

Oh shoot - I left out the href ... :-(
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Nov 22 '05 #5
Thank you,

That worked fine, I was calling the link wrong...

Sean
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:Wr********************@comcast.com...
"Sean M. Loftus" <sean(remove me)@loftus.org> wrote in message
news:eI**************@TK2MSFTNGP11.phx.gbl...
I have a need to call an html page into the pane I'm viewing using a

button
on an ASP page. The page itself is an ASP page called from a website. I

know
a link would work but the rest of the page has buttons and it would look
cleaner to use a button.

I've tried the below in a few variations, including using a href tags

inside
the onclick. Anyone have a suggestion on what I'm doing wrong here?

<input type="button" value="<%=L_MBS_Text%>"
onclick="get(https://domain.com/size/")>

--
Sean M. Loftus
Enterprise Architect
Loftus Consulting, Inc.
www.LoftusConsulting.com
sean(removeme)@loftus.org


You did not show us your get() function.

Perhaps all you want is this:

<input type="button" value="<%=L_MBS_Text%>"
onclick="location.href='https://domain.com/size/'">

Nov 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: bhennon | last post by:
Hey all, I have a small php script that calls a random image at the following page. http://www.2006ymcanationals.com/random.php IT WORKS IF I go directly to the above link. I am trying to...
1
by: Jim Mitchell | last post by:
Why is there no link tag on the Visual Studio HTML tool bar? What is the best way to add it other than as the text property of a label control? Thanks in advance.
3
by: Twinkletoes | last post by:
Hello people, my first post here... *wave* I need to know how to call a function in a different document. At the moment I've tried onFocus but I'm kinda in over my depth. Perhaps if I tell you...
4
by: evan.cooch | last post by:
Greetings. Suppose I have some function called "CheckIt" - some function to validate form data before submitting it to e CGI script. Pretend the name of the form is "TheForm". If I use the...
18
by: Simula | last post by:
I am developing an HTML javascript application and I want to preserve state in a way that can be book-marked. I chose HTML anchors as a means of preserving state. When the application changes...
2
by: Andrew Banks | last post by:
I've got the following code as part of a C# web form but am having problems calling a command. I create a dataset and put some data on the screen. This works fine. (relevant sample below) ...
1
by: polix | last post by:
Hi dear users I'm completly new in XML I'm trying to do the table with hyperlinks. Let me show you xml code (linki.xml) <?xml version="1.0" ?> <?xml-stylesheet type="text/xsl"...
5
by: smittie31 | last post by:
I am having a problem with a border around me html page. The border does not flow thru the whole html page, it cuts off halfway. --> See http://keithborom.com/marlon-sanders CSS STYLESHEET ...
4
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.